//
//  EMLocationManager.h
//  EasyMoney
//
//  Created by 邓乐 on 2020/1/13.
//  Copyright © 2020 zh. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

@interface EMLocationInfo : NSObject<YYModel,NSCoding, NSCopying>

@property (nonatomic, assign) double longitude;
@property (nonatomic, assign) double latitude;

@end

@class EMLocationManager;
@protocol EMLocationManagerDelegate <NSObject>

- (void)locationManager:(EMLocationManager *)locationManager didUpdateLocations:(NSArray *)locations;
- (void)locationManager:(EMLocationManager *)locationManager didFailWithError:(NSError *)error;

@end

@interface EMLocationManager : NSObject<CLLocationManagerDelegate>

@property (nonatomic, weak) id<EMLocationManagerDelegate> delegate;
@property (nonatomic, strong) EMLocationInfo *locationInfo;

+ (EMLocationManager *)sharedManager;

+ (BOOL)canGetLocation;

- (void)start;
- (void)stop;

@end
